﻿using Model.BusinessModel;
using Model.BusinessModel.InPut;
using Model.BusinessModel.OutPut;
using Model.DomainModel;
using Utility;

namespace DomainService.IService
{
    /// <summary>
    /// 流程服务接口
    /// </summary>
    public interface IFlowService
    {
        /// <summary>
        /// 新增流程数据
        /// </summary>
        /// <param name="flow">实体模型</param>
        ReceiveStatus Insert(FlowInput flow);

        /// <summary>
        /// 更新流程信息
        /// </summary>
        /// <param name="flow">实体模型</param>
        /// <returns></returns>
        ReceiveStatus Update(FlowInput flow);

        /// <summary>
        /// 获取所有流程
        /// </summary>
        /// <param name="pageResultModel">分页参数模型</param>
        /// <returns></returns>
        PageResultModel<FlowOutPut> GetAllFlow(PageResultModel pageResultModel);

        /// <summary>
        /// 根据主键获取流程
        /// </summary>
        /// <param name="flowId">流程主键</param>
        /// <returns></returns>
        ReceiveStatus<Flow> GetFlowByFlowId(string flowId);

        /// <summary>
        /// 获取流程节点配置
        /// </summary>
        /// <param name="flowId">流程id</param>
        /// <param name="flowNodeId">节点id</param>
        /// <returns></returns>
        ReceiveStatus<FlowNodeConfigOutPut> GetExpireDate(string flowId, string flowNodeId);

        /// <summary>
        /// 更新数据状态
        /// </summary>
        /// <param name="input">输入模型</param>
        /// <returns></returns>
        ReceiveStatus UpdateFlowDataState(UpdateDataStateInput input);

        /// <summary>
        /// 获取部门流程树形结构
        /// </summary>
        /// <param name="corporationKey">公司key</param>
        /// <returns></returns>
        ReceiveStatus<List<TreeOutPut>> GetDepartmentFlow(string corporationKey);

        /// <summary>
        /// 根据流程id获取流程和表单数据
        /// </summary>
        /// <param name="flowId">流程id</param>
        /// <returns></returns>
        ReceiveStatus<FlowOrFormOutPut> GetFlowOrFormByFlowId(string flowId);

    }
}
